package cn.hh.course.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class Course {
    private Long id;
    private String name;
    private Integer price;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date start_time = new Date();
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date end_time = new Date();
    private Integer sale_count;

    public Course(String name) {
        this.name = name;
    }

    public Course(Long id, String name, Integer price, Date start_time, Date end_time, Integer sale_count) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.start_time = start_time;
        this.end_time = end_time;
        this.sale_count = sale_count;
    }

    public Course() {
    }
}
